        <table class="cms_browsetext" cellspacing="0" cellpadding="0" width="100%" border="0">

            <tr> 
              <th align="left" width="60">&nbsp;</th>
              <th align="left" ><a href="#">Name</a> <a href="#">Surname</a></th>
              <th align="left" width="15">&nbsp;</th>
              <th width="75" align="left">Action</th>
            </tr>
<?

	//$returnURL = $_SERVER['PHP_SELF'] . "?fileNo=1&formid=" . $formid ."&sorts=clear&direction=clear&pageNumber=$pageNumber";
	//$cancelURL = $returnURL;
	$cmsDocument->setPageSize( $cmsDocument->totalDocuments() );		
	$cmsDocument->resetIterator();
	while($person = $cmsDocument->nextDocument()) {
		
			$personFirstname = magicClean($person->title);//
			$personLastname = magicClean($person->shortdescription);
			$personBio = magicClean($person->content);
			$personDepartment = magicClean($person->organisationalname);
			$personPhone = magicClean($person->address);
			$personFax = magicClean($person->phone);
			$personMobile = magicClean($person->fax);
			$personEmail = magicClean($person->email);
			
			
			$organisation = $cmsDocument->openDocument( $person->authordepartment);
			if (is_null($organisation)) {
				$organisation = new stdClass();
				//add the fields here.
				$organisation->title ="";
			}
			$organisationName= magicClean($organisation->title);
			
			
			if ($person->author){
				$imageUrl ="/html/blob.php?attach=false&scale=true&width=50&documentCode=" . $person->documentcode ;
			} else {
				$imageUrl = "/cms/images/icon_person_lrg.gif";
			}
			$editUrl = $_SERVER['PHP_SELF'] . '?fileNo=2&documentCode=' . $person->documentcode;
			$deleteUrl = $_SERVER['PHP_SELF'] . '?fileNo=4&documentCode=' . $person->documentcode . '&returnURLEncoded=' . urlencode($returnURL). '&cancelURLEncoded=' . urlencode($cancelURL);
			print <<< EOD
            <tr> 
              <td align="left" colspan="4"><img height="7" src="/cms/images/greyline.gif"  width="100%" /></td>
            </tr>            
            <tr> 
              <td width="60" rowspan="2" align="left" valign="top" class="cms_browsetext">
              	<img src="$imageUrl" width="50"  align="top" />
              </td>
              <td class="cms_browsetext" ><b>$personFirstname $personLastname</b> $organisationName<br>
                Department: $personDepartment</td>
              <td width="15">&nbsp;</td>
              <td class="cms_browsetext" rowspan="2" width="75" style="vertical-align: bottom" >
EOD;
		if(editFormAuth($authInfo, $formDescription, $person->documentcode, $db)) {
			print <<< EOD
<a href="$editUrl">Edit</a> 
EOD;
		}
		if(deleteFormAuth($authInfo, $formDescription, $person->documentcode, $db)) {
			print <<< EOD
 / <a href="$deleteUrl">Delete</a>
EOD;
		}
print <<< EOD
              </td>
            </tr>
            <tr> 
              <td colspan="2" class="cms_browsetext" style="vertical-align: bottom">P: $personPhone | F: $personFax | M: $personMobile | E: <a href="mailto:$personEmail">$personEmail</a></td>
            </tr>
EOD;

	}
?>
    <tr> 
      <td align="left" colspan="4"><img height="7" src="/cms/images/greyline.gif" width="100%" /></td>
    </tr>
        </table>